package com.hnucm.onlinealgstudy.utils;

import lombok.Data;

@Data
public class ResultOBJ {
    private Integer code;
    private String msg;
    private Object data;
    public ResultOBJ(Integer code){
        this.code = code;
    }
    public ResultOBJ(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }
    public ResultOBJ(Integer code, String msg, Object data){
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static final ResultOBJ ADD_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.ADD_Success);
    public static final ResultOBJ ADD_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.ADD_Error);
    //
    public static final ResultOBJ UPDATE_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Update_Success);
    public static final ResultOBJ UPDATE_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Update_Error);
    //
    public static final ResultOBJ LOGIN_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Login_Success);
    public static final ResultOBJ LOGIN_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Login_Error);
    //
    public static final ResultOBJ DELETE_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Delete_Success);
    public static final ResultOBJ DELETE_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Delete_Error);
    // 添加评论
    public static final ResultOBJ ADD_COMMENT_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Add_Comment_Success);
    public static final ResultOBJ ADD_COMMENT_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Add_Comment_Error);
    // 注册
    public static final ResultOBJ ENROLL_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Enroll_Success);
    public static final ResultOBJ ENROLL_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Enroll_Error);
    // 正确题数加一
    public static final ResultOBJ ACN_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Acn_Success);
    public static final ResultOBJ ACN_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Acn_Error);
    // 错误题数加一
    public static final ResultOBJ AWN_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Awn_Success);
    public static final ResultOBJ AWN_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Awn_Error);
    // 查找用户成功
    public static final ResultOBJ FIND_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Find_Success);
    public static final ResultOBJ FIND_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Find_Error);
    // 审批评论
    public static final ResultOBJ APPROVE_COMMENT_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Approval_Success);
    public static final ResultOBJ APPROVE_COMMENT_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Approval_Error);
    // 头像上传
    public static final ResultOBJ UPLOAD_SUCCESS=new ResultOBJ(SYSConstant.Code_Success,SYSConstant.Upload_Success);
    public static final ResultOBJ UPLOAD_ERROR=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Upload_Error);
    public static final ResultOBJ UPLOAD_WARNING=new ResultOBJ(SYSConstant.Code_Error,SYSConstant.Upload_Warning);
}
